package com.javatest.validate;

import lombok.Getter;
import lombok.NonNull;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;


/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @date 2020-09-01 下午4:41
 */
@Setter
@Getter
@ToString
public class Person {
    @NotNull
    private String name;

    @NonNull
    @Min(0)
    private Integer age;

    public Person() {
    }

    public Person(@NotNull String name, @NonNull @Min(0) Integer age) {
        this.name = name;
        this.age = age;
    }
}
